--  with Interfaces.C;
--  with System;

package FT2 is
   pragma Pure;

--     -----------------
--     -- Basic types --
--     -----------------
--
--     --  Renaming of Character to shorten enum representations
--  --     subtype C is Character;
--  --
--  --     type Void is null record;
--  --     pragma Convention (C, Void);
--  --
--  --
--  --     subtype FT_Byte is Interfaces.C.unsigned_char;
--  --
--  --     subtype FT_Char is Interfaces.C.char;
--  --     subtype FT_UChar is Interfaces.C.unsigned_char;
--  --     subtype FT_Short is Interfaces.C.short;
--  --     subtype FT_UShort is Interfaces.C.unsigned_short;
--  --     subtype FT_Int is Interfaces.C.int;
--  --     subtype FT_UInt is Interfaces.C.unsigned;
--  --     subtype FT_Long is Interfaces.C.long;
--  --     subtype FT_ULong is Interfaces.C.unsigned_long;
--  --     type FT_F26Dot6 is private;
--  --     type FT_Fixed is private;
--  --     type FT_Pos is private; --###
--  --
--  --     type FT_Bytes_Ptr is access all FT_Byte;
--  --     pragma Convention (C, FT_Bytes_Ptr);
--  --     type FT_Byte_Array is array (Natural range <>) of FT_Byte;
--  --     function To_Array (Ref : FT_Bytes_Ptr; Length : FT_Int) return FT_Byte_Array;
--  --
--  --     type FT_Shorts_Ptr is access all FT_Short;
--  --     pragma Convention (C, FT_Shorts_Ptr);
--  --     type FT_Short_Array is array (Natural range <>) of FT_Short;
--  --     function To_Array (Ref : FT_Shorts_Ptr; Length : FT_Int) return FT_Short_Array;
--  --
--  --
--  --     type FT_String_Ptr is access all FT_Char;
--  --     pragma Convention (C, FT_String_Ptr);
--  --     function To_String (X : FT_String_Ptr) return String;
--  --
--  --     type FT_Error is new Interfaces.C.int;
--
--     -------------
--     -- Generic --
--     -------------
--
--  --     type FT_Generic_Finalizer is access procedure (Object : System.Address);
--  --     pragma Convention (C, FT_Generic_Finalizer);
--  --
--  --     type FT_Generic is record
--  --        Data      : System.Address := System.Null_Address;
--  --        Finalizer : FT_Generic_Finalizer;
--  --     end record;
--  --     pragma Convention (C, FT_Generic);
--
--     ------------
--     -- Vector --
--     ------------
--
--  --     type FT_Vector is record
--  --        X : FT_Pos;
--  --        Y : FT_Pos;
--  --     end record;
--  --     pragma Convention (C, FT_Vector);
--  --     type FT_Vectors_Ptr is access all FT_Vector;
--  --     type FT_Vector_Array is array (Natural range <>) of FT_Vector;
--  --     function To_Array (Ref : FT_Vectors_Ptr; Length : FT_Int) return FT_Vector_Array;
--
--     ------------
--     -- Matrix --
--     ------------
--
--  --     type FT_Matrix is record
--  --        XX : FT_Fixed;
--  --        XY : FT_Fixed;
--  --        YX : FT_Fixed;
--  --        YY : FT_Fixed;
--  --     end record;
--  --     pragma Convention (C, FT_Matrix);
--
--     ----------
--     -- BBox --
--     ----------
--
--  --     type FT_BBox is record
--  --        Min : FT_Vector;
--  --        Max : FT_Vector;
--  --     end record;
--  --     pragma Convention (C, FT_BBox);
--
--     -- Handles
--
--
--     type FT_SubGlyph is access Void;
--  --   type FT_Stream is access Void;
--     type FT_Module is access Void;
--  --     type FT_Driver is access Void;
--  --     type FT_Renderer is access Void;
--
--
--     --  This is declared as an enum in FT2, but it is said that some encodings
--     --  could be defined by specific drivers. Therefore, this is not an
--     --  enumeration (Ada meaning).
--     type FT_Encoding is new FT_Int;
--     FT_ENCODING_NONE : constant FT_Encoding := 0;
--     FT_ENCODING_MS_SYMBOL : constant FT_Encoding :=
--       C'Pos ('s') * 2**24 + C'Pos ('y')*2**16 + C'Pos ('m')*2**8 + C'Pos ('b');
--     FT_ENCODING_UNICODE : constant FT_Encoding :=
--       C'Pos ('u') * 2**24 + C'Pos ('n')*2**16 + C'Pos ('i')*2**8 + C'Pos ('c');
--     FT_ENCODING_SJIS : constant FT_Encoding :=
--       C'Pos ('s') * 2**24 + C'Pos ('j')*2**16 + C'Pos ('i')*2**8 + C'Pos ('s');
--     FT_ENCODING_GB2312 : constant FT_Encoding :=
--       C'Pos ('g') * 2**24 + C'Pos ('b')*2**16 + C'Pos (' ')*2**8 + C'Pos (' ');
--     FT_ENCODING_BIG5 : constant FT_Encoding :=
--       C'Pos ('b') * 2**24 + C'Pos ('i')*2**16 + C'Pos ('g')*2**8 + C'Pos ('5');
--     FT_ENCODING_WANSUNG : constant FT_Encoding :=
--       C'Pos ('w') * 2**24 + C'Pos ('a')*2**16 + C'Pos ('n')*2**8 + C'Pos ('s');
--     FT_ENCODING_JOHAB : constant FT_Encoding :=
--       C'Pos ('j') * 2**24 + C'Pos ('o')*2**16 + C'Pos ('h')*2**8 + C'Pos ('a');
--     FT_ENCODING_ADOBE_STANDARD : constant FT_Encoding :=
--       C'Pos ('A') * 2**24 + C'Pos ('D')*2**16 + C'Pos ('O')*2**8 + C'Pos ('B');
--     FT_ENCODING_ADOBE_EXPERT : constant FT_Encoding :=
--       C'Pos ('A') * 2**24 + C'Pos ('D')*2**16 + C'Pos ('B')*2**8 + C'Pos ('E');
--     FT_ENCODING_ADOBE_CUSTOM : constant FT_Encoding :=
--       C'Pos ('A') * 2**24 + C'Pos ('D')*2**16 + C'Pos ('B')*2**8 + C'Pos ('C');
--     FT_ENCODING_ADOBE_LATIN_1 : constant FT_Encoding :=
--       C'Pos ('l') * 2**24 + C'Pos ('a')*2**16 + C'Pos ('t')*2**8 + C'Pos ('1');
--     FT_ENCODING_OLD_LATIN_2 : constant FT_Encoding :=
--       C'Pos ('l') * 2**24 + C'Pos ('a')*2**16 + C'Pos ('t')*2**8 + C'Pos ('2');
--     FT_ENCODING_APPLE_ROMAN : constant FT_Encoding :=
--       C'Pos ('a') * 2**24 + C'Pos ('r')*2**16 + C'Pos ('m')*2**8 + C'Pos ('n');
--
--     type FT_Glyph_Metrics is record
--        Width                : FT_Pos;
--        Height               : FT_Pos;
--        Horizontal_Bearing_X : FT_Pos;
--        Horizontal_Bearing_Y : FT_Pos;
--        Horizontal_Advance   : FT_Pos;
--        Vertical_Bearing_X   : FT_Pos;
--        Vertical_Bearing_Y   : FT_Pos;
--        Vertical_Advance     : FT_Pos;
--     end record;
--     pragma Convention (C, FT_Glyph_Metrics);
--
--
--     type FT_Bitmap_Size is record
--        Height : FT_Short;
--        Width  : FT_Short;
--        Size   : FT_Pos;
--        X_ppem : FT_Pos;
--        Y_ppem : FT_Pos;
--     end record;
--     pragma Convention (C, FT_Bitmap_Size);
--     type FT_Bitmap_Sizes_Ptr is access all FT_Bitmap_Size;
--  --     type FT_Face_Internal is access Void;
--
--     type FT_Face_Flag is new FT_ULong;
--     FT_FACE_FLAG_SCALABLE          : constant FT_Face_Flag :=    16#1#;
--     FT_FACE_FLAG_FIXED_SIZES       : constant FT_Face_Flag :=    16#2#;
--     FT_FACE_FLAG_FIXED_WIDTH       : constant FT_Face_Flag :=    16#4#;
--     FT_FACE_FLAG_SFNT              : constant FT_Face_Flag :=    16#8#;
--     FT_FACE_FLAG_HORIZONTAL        : constant FT_Face_Flag :=   16#10#;
--     FT_FACE_FLAG_VERTICAL          : constant FT_Face_Flag :=   16#20#;
--     FT_FACE_FLAG_KERNING           : constant FT_Face_Flag :=   16#40#;
--     FT_FACE_FLAG_FAST_GLYPHS       : constant FT_Face_Flag :=   16#80#;
--     FT_FACE_FLAG_MULTIPLE_MASTERS  : constant FT_Face_Flag :=  16#100#;
--     FT_FACE_FLAG_GLYPH_NAMES       : constant FT_Face_Flag :=  16#200#;
--     FT_FACE_FLAG_EXTERNAL_STREAM   : constant FT_Face_Flag :=  16#400#;
--     FT_FACE_FLAG_HINTER            : constant FT_Face_Flag :=  16#800#;
--     FT_FACE_FLAG_CID_KEYED         : constant FT_Face_Flag := 16#1000#;
--     FT_FACE_FLAG_TRICKY            : constant FT_Face_Flag := 16#2000#;
--
--
--     type FT_Style_Flag is new FT_ULong;
--     FT_STYLE_FLAG_ITALIC : constant FT_Style_Flag := 16#1#;
--     FT_STYLE_FLAG_BOLD   : constant FT_Style_Flag := 16#2#;
--
--
--     type FT_Size_Metrics is record
--        X_ppem      : FT_UShort;
--        Y_ppem      : FT_UShort;
--        X_Scale     : FT_Fixed;
--        Y_Scale     : FT_Fixed;
--        Ascender    : FT_Pos;
--        Descender   : FT_Pos;
--        Height      : FT_Pos;
--        Max_Advance : FT_Pos;
--     end record;
--     pragma Convention (C, FT_Size_Metrics);
--
--
--  --     type FT_Pixel_Mode is
--  --       (FT_PIXEL_MODE_NONE,
--  --        FT_PIXEL_MODE_MONO,
--  --        FT_PIXEL_MODE_GRAY,
--  --        FT_PIXEL_MODE_GRAY2,
--  --        FT_PIXEL_MODE_GRAY4,
--  --        FT_PIXEL_MODE_LCD,
--  --        FT_PIXEL_MODE_LCD_V);
--  --     for FT_Pixel_Mode'Size use 8;
--  --
--  --     type FT_Bitmap is record
--  --        Rows         : FT_Int := 0;
--  --        Width        : FT_Int := 0;
--  --        Pitch        : FT_Int := 0;
--  --        Buffer       : FT_Bytes_Ptr;
--  --        Num_Grays    : FT_Short := 0;
--  --        Pixel_Mode   : FT_Pixel_Mode;
--  --        Palette_Mode : FT_Char; -- ###
--  --        Palette      : System.Address;
--  --     end record;
--  --     pragma Convention (C, FT_Bitmap);
--
--  --     type FT_Glyph_Format is new FT_Int;
--  --     FT_GLYPH_FORMAT_NONE : constant FT_Glyph_Format := 0;
--  --     FT_GLYPH_FORMAT_BITMAP : constant FT_Glyph_Format :=
--  --        C'Pos ('b') * 2**24 + C'Pos ('i')*2**16 + C'Pos ('t')*2**8 + C'Pos ('s');
--  --     FT_GLYPH_FORMAT_COMPOSITE : constant FT_Glyph_Format :=
--  --        C'Pos ('c') * 2**24 + C'Pos ('o')*2**16 + C'Pos ('m')*2**8 + C'Pos ('p');
--  --     FT_GLYPH_FORMAT_OUTLINE : constant FT_Glyph_Format :=
--  --        C'Pos ('o') * 2**24 + C'Pos ('u')*2**16 + C'Pos ('t')*2**8 + C'Pos ('l');
--  --     FT_GLYPH_FORMAT_PLOTTER : constant FT_Glyph_Format :=
--  --        C'Pos ('p') * 2**24 + C'Pos ('l')*2**16 + C'Pos ('o')*2**8 + C'Pos ('t');
--
--
--     type FT_Open_Flag is new FT_UInt;
--     FT_OPEN_MEMORY   : constant FT_Open_Flag := 16#1#;
--     FT_OPEN_STREAM   : constant FT_Open_Flag := 16#2#;
--     FT_OPEN_PATHNAME : constant FT_Open_Flag := 16#4#;
--     FT_OPEN_DRIVER   : constant FT_Open_Flag := 16#8#;
--     FT_OPEN_PARAMS   : constant FT_Open_Flag := 16#10#;
--
--     type FT_Parameter is record
--        Tag  : FT_ULong;
--        Data : System.Address;
--     end record;
--     pragma Convention (C, FT_Parameter);
--     type FT_Parameters_Ptr is access all FT_Parameter;
--     pragma Convention (C, FT_Parameters_Ptr);
--     type FT_Parameter_Array is array (Natural range <>) of FT_Parameter;
--     function To_Array (Ref : FT_Parameters_Ptr; Length : FT_Int) return FT_Parameter_Array;
--
--
--     type FT_Size_Request_Type is
--       (FT_SIZE_REQUEST_TYPE_NOMINAL,
--        FT_SIZE_REQUEST_TYPE_REAL_DIM,
--        FT_SIZE_REQUEST_TYPE_BBOX,
--        FT_SIZE_REQUEST_TYPE_CELL,
--        FT_SIZE_REQUEST_TYPE_SCALES);
--     pragma Convention (C, FT_Size_Request_Type);
--
--     type FT_Size_RequestRec is record
--        CType : FT_Size_Request_Type;
--        Width : FT_Long;
--        Height : FT_Long;
--        Hori_Resolution : FT_UInt;
--        Vert_Resolution : FT_UInt;
--     end record;
--     pragma Convention (C, FT_Size_RequestRec);
--  --     type FT_Size_Request is access Void;
--
--     -- One should create two types here, one for load flags (16 bits) and an enum
--     -- for load target (16 bits)
--     type FT_Load_Flags is new Interfaces.Unsigned_32;
--     FT_LOAD_DEFAULT                     : constant FT_Load_Flags :=    16#0#;
--     FT_LOAD_NO_SCALE                    : constant FT_Load_Flags :=    16#1#;
--     FT_LOAD_NO_HINTING                  : constant FT_Load_Flags :=    16#2#;
--     FT_LOAD_RENDER                      : constant FT_Load_Flags :=    16#4#;
--     FT_LOAD_NO_BITMAP                   : constant FT_Load_Flags :=    16#8#;
--     FT_LOAD_VERTICAL_LAYOUT             : constant FT_Load_Flags :=   16#10#;
--     FT_LOAD_FORCE_AUTOHINT              : constant FT_Load_Flags :=   16#20#;
--     FT_LOAD_CROP_BITMAP                 : constant FT_Load_Flags :=   16#40#;
--     FT_LOAD_PEDANTIC                    : constant FT_Load_Flags :=   16#80#;
--     FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH : constant FT_Load_Flags :=  16#200#;
--     FT_LOAD_NO_RECURSE                  : constant FT_Load_Flags :=  16#400#;
--     FT_LOAD_IGNORE_TRANSFORM            : constant FT_Load_Flags :=  16#800#;
--     FT_LOAD_MONOCHROME                  : constant FT_Load_Flags := 16#1000#;
--     FT_LOAD_LINEAR_DESIGN               : constant FT_Load_Flags := 16#2000#;
--     FT_LOAD_NO_AUTOHINT                 : constant FT_Load_Flags := 16#8000#;
--
--     FT_LOAD_TARGET_NORMAL : constant FT_Load_Flags := 16#00000#;
--     FT_LOAD_TARGET_LIGHT  : constant FT_Load_Flags := 16#10000#;
--     FT_LOAD_TARGET_MONO   : constant FT_Load_Flags := 16#20000#;
--     FT_LOAD_TARGET_LCD    : constant FT_Load_Flags := 16#30000#;
--     FT_LOAD_TARGET_LCD_V  : constant FT_Load_Flags := 16#40000#;
--
--     --  function FT_LOAD_TARGET_MODE (x : FT_Load_Flags) return FT_Render_Mode;
--
--
--     type FT_Render_Mode is
--       (FT_RENDER_MODE_NORMAL,
--        FT_RENDER_MODE_LIGHT,
--        FT_RENDER_MODE_MONO,
--        FT_RENDER_MODE_LCD,
--        FT_RENDER_MODE_LCD_V);
--     pragma Convention (C, FT_Render_Mode);
--
--     type FT_Kerning_Mode is
--       (FT_KERNING_DEFAULT,
--        FT_KERNING_UNFITTED,
--        FT_KERNING_UNSCALED);
--     pragma Convention (C, FT_Kerning_Mode);
--
--
--     type FT_FSType_Flags is new FT_UShort;
--     FT_FSTYPE_INSTALLABLE_EMBEDDING        : constant FT_FSType_Flags := 16#0000#;
--     FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING : constant FT_FSType_Flags := 16#0002#;
--     FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING  : constant FT_FSType_Flags := 16#0004#;
--     FT_FSTYPE_EDITABLE_EMBEDDING           : constant FT_FSType_Flags := 16#0008#;
--     FT_FSTYPE_NO_SUBSETTING                : constant FT_FSType_Flags := 16#0100#;
--     FT_FSTYPE_BITMAP_EMBEDDING_ONLY        : constant FT_FSType_Flags := 16#0200#;
--
--
--     type FT_SubGlyph_Flags is new FT_UInt;
--     FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS     : constant FT_SubGlyph_Flags :=   16#1#;
--     FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES : constant FT_SubGlyph_Flags :=   16#2#;
--     FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID   : constant FT_SubGlyph_Flags :=   16#4#;
--     FT_SUBGLYPH_FLAG_SCALE              : constant FT_SubGlyph_Flags :=   16#8#;
--     FT_SUBGLYPH_FLAG_XY_SCALE           : constant FT_SubGlyph_Flags :=  16#40#;
--     FT_SUBGLYPH_FLAG_2X2                : constant FT_SubGlyph_Flags :=  16#80#;
--     FT_SUBGLYPH_FLAG_USE_MY_METRICS     : constant FT_SubGlyph_Flags := 16#200#;
--
--  --  private
--  --     type PrivateRec is record
--  --        null;
--  --     end record;
--
--  --     type FT_F26Dot6 is new Interfaces.C.int; -- TODO
--  --     type FT_Fixed is new Interfaces.C.int; -- TODO
--  --     type FT_Pos is new Interfaces.C.long; -- TODO

end FT2;
